﻿<%@ Page Title="报警历史信息饼形图" Language="C#" MasterPageFile="~/Web/Main.Master" AutoEventWireup="true" CodeBehind="WarningStatusChart.aspx.cs" Inherits="BOMS.WebUI.Web.Warning.WarningStatusChart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" href="../amcharts/images/style.css" type="text/css" />
        <script src="../amcharts/amcharts/amcharts.js" type="text/javascript"></script>         
        <script type="text/javascript">
            $(document).ready(function () {
                init();
            });
            var chart;
            var legend;
            function init() {
                var strChartData = $("#<%=JsonData1.ClientID %>").val();
//                  alert(strChartData);
                var jsonObj = eval(strChartData);

                AmChartsBind(jsonObj);

            }



            function AmChartsBind(chartData) {
                // PIE CHART
                chart = new AmCharts.AmPieChart();
                chart.dataProvider = chartData;
                chart.titleField = "Status";
                chart.valueField = "Count";
                chart.outlineColor = "#FFFFFF";
                chart.outlineAlpha = 0.8;
                chart.outlineThickness = 2;

                // WRITE
                chart.write("chartdiv");
            }
        </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
    <tr>
        <td class="usertablerow3"><asp:Label ID="LabelTitle" runat="server" Text="Label"></asp:Label></td>
    </tr>
    <tr>
        <td align="right">
        <input type="button" value="打 印" onclick="window.print()" class="btnbg"/>
        <input type="button" value="返 回" onclick="location.href='warningStat.aspx'" class="btnbg" />
        </td>
    </tr>
    <tr>
    <td> <div id="chartdiv" style="width: 100%; height: 400px;"></div></td>
           
    </tr>
</table>
      <asp:TextBox ID="JsonData1"  runat="server" ClientIDMode="Static" 
        Visible="True" style="display:none"></asp:TextBox>
</asp:Content>
